<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>羔羊论坛</title>
<link rel="icon" type="image/x-icon" href="img/sheep.ico" />
<link rel="stylesheet" type="text/css" href="css/seniorsearch.css" />
<style>
	.time{width:20px;background:transparent;}
	.wbk{width:250px;height:26px;font-size:16px;background:transparent;}
	.xlcd{width:150px;height:28px;background:transparent;}
	table{margin:auto 20px}
	.name{width:100px;height:30px;font-family:"微软雅黑"}
	.content{width:400px;height:30px}
</style>
</head>
<body>
<%
	request.setCharacterEncoding("UTF-8");
	String username=(String)session.getAttribute("username");
	String role=(String)session.getAttribute("userrole");
	String status=(String)session.getAttribute("userstatus");
	
	String searchtext = (String)request.getAttribute("searchtext");
	String types = (String)request.getAttribute("types");
	String statuss = (String)request.getAttribute("status");
	String sort = (String)request.getAttribute("sort");
	String sj = (String)request.getAttribute("sj");
%>
<div id="t">
	<ul>
		<li><a href='index.jsp'>返回首页</a></li>
	</ul>
</div>
<div id="container">
	<div id="header">
		<form action="MessageServlet?po=senior" method="post" target="mainframe">
			<table>
				<tr>
					<td class="name">关键内容：</td>
					<td class="content"><input type="text" class="wbk" name="searchtext" placeholder="查看所有发言" value="<%=searchtext==null?"":searchtext %>">&nbsp;&nbsp;<input type="submit" style="width:50px;height:30px;background:transparent;" value="搜索"/></td>
				</tr>
				<tr>
					<td class="name">话题类型：</td>
					<td class="content">
						<select name="types" class="xlcd">
							<option value="quanbu" <%="quanbu".equals(types)?"selected":"" %>>全部</option>
							<option value="shenghuo" <%="shenghuo".equals(types)?"selected":"" %>>生活</option>
							<option value="qinggan" <%="qinggan".equals(types)?"selected":"" %>>情感</option>
							<option value="yule" <%="yule".equals(types)?"selected":"" %>>娱乐</option>
							<option value="gaoxiao" <%="gaoxiao".equals(types)?"selected":"" %>>搞笑</option>
							<option value="xinwen" <%="xinwen".equals(types)?"selected":"" %>>新闻</option>
							<option value="tiyu" <%="tiyu".equals(types)?"selected":"" %>>体育</option>
							<option value="youxi" <%="youxi".equals(types)?"selected":"" %>>游戏</option>
							<option value="xiaoshuo" <%="xiaoshuo".equals(types)?"selected":"" %>>小说</option>
							<option value="dongman" <%="dongman".equals(types)?"selected":"" %>>动漫</option>
						</select>
					</td>
				</tr>
				
				<%
					if("admin"==role||"admin".equals(role))
					{
				%>
				<tr>
					<td class="name">留言状态：</td>
					<td class="content">
						<select name="status" class="xlcd">
							<option value="quanbu" <%="quanbu".equals(statuss)?"selected":"" %>>全部</option>
							<option value="正常" <%="正常".equals(statuss)?"selected":"" %>>正常</option>
							<option value="封禁" <%="封禁".equals(statuss)?"selected":"" %>>封禁</option>
						</select>				
					</td>
				</tr>
				<%
					}
					else
					{
				%>
						<input type="hidden" name="status" value="正常">
				<%
					}
				%>
				<tr>
					<td class="name">排序方式：</td>
					<td class="content">
						<select name="sort" class="xlcd">
							<option value="title" <%="title".equals(sort)?"selected":"" %>>按标题排序</option>
							<option value="username" <%="username".equals(sort)?"selected":"" %>>按楼主排序</option>
							<option value="type" <%="type".equals(sort)?"selected":"" %>>按类型排序</option>
							<option value="date" <%="date".equals(sort)?"selected":"" %>>按时间排序</option>
						</select>
					<input type="radio" name="sj" id="m" value="asc" checked><label for="m">默认</label>
					<input type="radio" name="sj" id="s" value="asc" <%="asc".equals(sj)?"checked":"" %>><label for="s">升序</label>
					<input type="radio" name="sj" id="j" value="desc" <%="desc".equals(sj)?"checked":""%>><label for="j">降序</label></td>
				</tr>
			</table>
		</form>
	</div>
	<div id="main">
		<iframe width="100%" height="100%" frameborder="0" scrolling="auto" name="mainframe" id="mainframe"></iframe>
	</div>
</div>
</body>
</html>